#include <bits/stdc++.h>
using namespace std;

int main(){
    vector<int> coin(10005);
    int pos = 1;
    for(int i = 1; pos < 10001; ++i){
        for(int j = 0; j < i && pos < 10001; ++j){
            coin[pos] = coin[pos - 1] + i;
            pos++;
        }
    }
    int n;
    while(cin >> n){
        cout << n << " " << coin[n] << endl;
    }
}